home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 051-075 / disk_068 / mg1b / tty / amiga / ttydef.h < prev    next >
C/C++ Source or Header  |  1992-05-06  |  3KB  |  138 lines

  1. /*
  2.  * Name:    MicroEMACS
  3.  *        Amiga console device virtual terminal header file
  4.  * Version:    Gnu v30
  5. * Last edit:    18-Jan-87 ...!ihnp4!seismo!ut-sally!ut-ngp!mic
  6.  * Created:    20-Apr-86 ...!ihnp4!seismo!ut-sally!ut-ngp!mic
  7.  */
  8. #define    GOSLING                /* Compile in fancy display.    */
  9.  
  10. #define    NROW    48            /* Max rows (only in interlace)    */
  11. #define    NCOL    80            /* Columns (borderless window)    */
  12. #define    TOP_OFFSET    11        /* # raster lines from top of window */
  13.  
  14. /*
  15.  * Special keys for the default Amiga console device keymap.
  16.  * Function key codes are in the form <CSI>v~
  17.  * where v is a 1 or 2-digit code between 0 and 19,
  18.  * so they comprise the first 20 entries in the key
  19.  * table.  The next 12 entries are for the help and
  20.  * arrow keys.
  21.  */
  22. #define    KF1    K01
  23. #define    KF2    K02
  24. #define    KF3    K03
  25. #define    KF4    K04
  26. #define    KF5    K05
  27. #define    KF6    K06
  28. #define    KF7    K07
  29. #define    KF8    K08
  30. #define    KF9    K09
  31. #define    KF10    K0A
  32. #define    KSF1    K0B
  33. #define    KSF2    K0C
  34. #define    KSF3    K0D
  35. #define    KSF4    K0E
  36. #define    KSF5    K0F
  37. #define    KSF6    K10
  38. #define    KSF7    K11
  39. #define    KSF8    K12
  40. #define    KSF9    K13
  41. #define    KSF10    K14
  42. #define    KUP    K15
  43. #define    KSUP    K16
  44. #define    KDOWN    K17
  45. #define    KSDOWN    K18
  46. #define    KLEFT    K19
  47. #define    KSLEFT    K1A
  48. #define    KRIGHT    K1B
  49. #define    KSRIGHT    K1C
  50. #define    KHELP    K1D
  51.  
  52. /* The 'menu' key doesn't really appear on the
  53.  * Amiga keyboard.  When ttgetc() sees a menu
  54.  * event, it saves the menu number and item,
  55.  * then stuffs the sequence for KMENU into
  56.  * the input buffer.
  57.  */
  58. #define    KMENU    K1E
  59.  
  60. /*
  61.  * Intuition menu interface.  Each set of menu items
  62.  * kept in a table of MenuBinding structures, which
  63.  * is in turn kept in a table of MenuInfo structures.
  64.  *
  65.  * These tables are indexed via the menu and item
  66.  * numbers to find the internal extended name of
  67.  * the function associated with a certain item.
  68.  */
  69. struct MenuBinding {
  70.     char *Command;
  71.     char *Binding;
  72. };
  73.  
  74. struct MenuInfo {
  75.     char *Name;            /* name of menu            */
  76.     short NumItems;            /* # of items            */
  77.     struct MenuBinding *Items;    /* item name, internal binding    */
  78. };
  79.  
  80. #define NITEMS(arr) (sizeof(arr) / (sizeof(arr[0])))
  81.  
  82. /*
  83.  * If either MENU, or BROWSER is defined, we need to define
  84.  * DO_MENU to get the code for dealing with menu selections
  85.  * compiled in.
  86.  */
  87.  
  88. #ifdef    MENU
  89. #define    DO_MENU
  90. #else
  91. #ifdef    BROWSER
  92. #define    DO_MENU
  93. #endif    BROWSER
  94. #endif    MENU
  95.  
  96. /*
  97.  * MODE_RENDITION and TEXT_RENDITION
  98.  * determine the way the mode line and
  99.  * text area are rendered (using the SGR
  100.  * sequence).  TEXT_* and MODE_* set the
  101.  * foreground (FG) and background (BG)
  102.  * color to the specified number.  If you
  103.  * #define CHANGE_COLOR, you can redefine
  104.  * these dynamically.
  105.  */
  106.  
  107. #ifndef MODE_RENDITION
  108. #define    MODE_RENDITION 7
  109. #endif
  110.  
  111. #ifndef TEXT_RENDITION
  112. #define    TEXT_RENDITION 0
  113. #endif
  114.  
  115. #ifndef    TEXT_FG
  116. #define TEXT_FG 1
  117. #endif
  118.  
  119. #ifndef TEXT_BG
  120. #define TEXT_BG 0
  121. #endif
  122.  
  123. #ifndef    MODE_FG
  124. #define MODE_FG 1
  125. #endif
  126.  
  127. #ifndef    MODE_BG
  128. #define MODE_BG 0
  129. #endif
  130.  
  131. /*
  132.  * Return the width and height of
  133.  * the default font for a window.
  134.  */
  135.  
  136. #define    FontWidth(w) (w)->RPort->TxWidth
  137. #define    FontHeight(w) (w)->RPort->TxHeight
  138.